"""
定义 函数，获取登录成功令牌，组织请求头
"""
import requests
def get_header():
    req_data = {"username": "admin",    "password": "123456"}
    login_url = "http://localhost:8080/admin/employee/login"

    resp = requests.post(url=login_url,json=req_data)
    header = {"token":resp.json().get('data').get('token')}
    return header


if __name__ == '__main__':
    print(get_header())